<?php
/* @var $this ConfigurationController */

$this->breadcrumbs=array(
	'Configurations'
);
?>
<h3 align="center">Configurations</h3>
<?php
    $this->widget('zii.widgets.grid.CGridView', array(
		'enableSorting'=>false,
        'dataProvider'=>$dataProvider,
        'columns'=>array(
            array(
				'header' => 'Index',
				'value'=> '++$row'
			),
			array(
				'labelExpression'=>'$data->filename',
				'class'=>'CLinkColumn',
				'urlExpression'=>'Yii::app()->request->baseUrl."/".Yii::app()->params->uploadPath."/".$data->id."_".$data->filename',
				'header'=>'File'
			),
			'version',
            array(
                'name'=>'user',
                'value'=>'$data->user0->displayname == null ? $data->user : $data->user0->displayname'
            ),
            array(
                'name'=>'installeddate',
                'value'=>'strtotime($data->installeddate) ? date("m/d/Y", strtotime($data->installeddate)) :""',
                'cssClassExpression'=>'"td-align-right"'
            ),
            array(
                'class'=>'CButtonColumn',
                'template'=>'{update}{delete}',
                'buttons'=>array(
                    'update'=>array(
						'url'=>'Yii::app()->createUrl("configuration/detail", Yii::app()->params->usePopup ? array("id"=>$data->id, "isPopup"=>"t") : array("id"=>$data->id))',
                        'options'=>array('class'=>'detail')
                    )
                )
            )
        )
    ));
?>
<?php if (isset($msg) && $msg != '') echo '<ul style="color:blue">'.$msg.'</ul>';?>
<br />
<?php
	if (Yii::app()->params->usePopup)
	{
		$this->widget('application.extensions.fancybox.EFancyBox', array(
			'target'=>'.detail',
			'config'=>array(),
		));
	}
	echo CHtml::link(' Upload ', Yii::app()->createUrl('/configuration/detail', Yii::app()->params->usePopup ? array("isPopup"=>"t") : array()), array('class'=>'link-button detail'));
?>